<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>用户列表</title>
</head>
<body>
<!--一个基本的 html表格-->
<table border="1px" cellspacing="0px">
  <tr>
    <th th:width="40px">学号</th>
    <th th:width="40px">姓名</th>
    <th th:width="150px">班级</th>
    <th th:width="150px">选课信息</th>
    <th >删除</th>
    <th>更新</th>
  </tr>

  <tr th:each="student:${studentlist}">
    <td th:text="${student.num}"></td>

    <td th:text="${student.name}"></td>

    <td th:text="${student.classname}"></td>
    <td>
      <ul th:each="course:${student.courseList}" >
        <li th:text="${course.c_name}"></li>
        <li th:text="${course.score}"></li>
      </ul>
    </td>

    <td><a th:href="@{'/deletestudentbyid?num='+${student.num}}">删除用户</a> </td>
    <td><a th:href="@{updatepersonbyid(num=${student.num},courseId=${student.courseList},classname=${student.classname})}">更新用户</a> </td>
  </tr>
</table>
<form th:action="@{/lookinfo} " method="post" style="margin-top: 20px">
  请输入用户名：<input name="name"><br>
  <div><input type="submit" value="查询"></div>
</form>
</body>
</html>